using Microsoft.Extensions.DependencyInjection;
using System.Windows;
using WPFPractice.Windows;

namespace WPFPractice
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void BtnTextBox_OnClick(object sender, RoutedEventArgs e)
        {
            new WinTextBox().Show();
        }

        private void BtnSpirePdf_Click(object sender, RoutedEventArgs e)
        {
            new WinSpirePdf().Show();
        }

        private void BtnDingTalk_OnClick(object sender, RoutedEventArgs e)
        {
            new WinDingTalk().Show();
        }

        private void BtnMoveResize_OnClick(object sender, RoutedEventArgs e)
        {
            new WinButtonMoveResize().Show();
        }

        private void BtnReoGrid_OnClick(object sender, RoutedEventArgs e)
        {
            new WinReoGrid().Show();
        }

        private void BtnPathGeometry_OnClick(object sender, RoutedEventArgs e)
        {
            new WinPathGeometry().Show();
        }

        private void BtnGetLastInputInfo_OnClick(object sender, RoutedEventArgs e)
        {
            new WinGetLastInputInfo().Show();
        }

        private void BtnComboBox_OnClick(object sender, RoutedEventArgs e)
        {
            new WinComboBox().Show();
        }

        private void BtnDataGrid_OnClick(object sender, RoutedEventArgs e)
        {
            new WinDataGrid().Show();
        }

        private void BtnDataGrid2_OnClick(object sender, RoutedEventArgs e)
        {
            new WinDataGrid2().Show();
		}

		private void BtnDataGrid3_OnClick(object sender, RoutedEventArgs e)
		{
			new WinDataGrid3().Show();
		}

		private void BtnDataGrid4_OnClick(object sender, RoutedEventArgs e)
		{
			new WinDataGrid4().Show();
		}

		private void BtnDgAndLv_OnClick(object sender, RoutedEventArgs e)
        {
            new WinDataGridAndListView().Show();
        }

        private void BtnRadioButton_OnClick(object sender, RoutedEventArgs e)
        {
            new WinRadioButton().Show();
        }

        private void BtnCSharpTester_OnClick(object sender, RoutedEventArgs e)
        {
            new WinCSharpTester().Show();
        }

        private void BtnTaskTester_OnClick(object sender, RoutedEventArgs e)
        {
            new WinTaskTester().Show();
        }

        private void BtnMsiInstaller_OnClick(object sender, RoutedEventArgs e)
        {
            new WinMsiInstaller().Show();
        }

        private void BtnInputMethod_OnClick(object sender, RoutedEventArgs e)
        {
            new WinInputMethod().Show();
        }

        private void BtnUserControls_OnClick(object sender, RoutedEventArgs e)
        {
            new WinUserControls().Show();
        }

        private void BtnWPFUI_OnClick(object sender, RoutedEventArgs e)
        {
            new WinWPFUI().Show();
        }

        private void BtnWinImage_OnClick(object sender, RoutedEventArgs e)
        {
            new WinImage().Show();
        }

        private void BtnDITester_OnClick(object sender, RoutedEventArgs e)
        {
            var win = App.ServiceProvider.GetService<WinDITester>();
            if (win != null)
            {
                MessageBox.Show($"从容器中获取窗口成功");
                win.Show();
            }
            else
            {
                MessageBox.Show($"从容器中获取窗口失败");
            }
        }

        private void BtnWpfToast_OnClick(object sender, RoutedEventArgs e)
        {
            new WinWpfToast().Show();
        }

        private void BtnBatchSetText_OnClick(object sender, RoutedEventArgs e)
        {
            new WinBatchSetText().Show();
        }

        private void BtnColorCompare_OnClick(object sender, RoutedEventArgs e)
        {
            new WinColorCompare().Show();
        }

        private void BtnStyles_OnClick(object sender, RoutedEventArgs e)
        {
            new WinStyles().Show();
        }

        private void BtnScrollTester_OnClick(object sender, RoutedEventArgs e)
        {
            new WinScrollTester().Show();
        }

		private void BtnControls_OnClick(object sender, RoutedEventArgs e)
		{
			new WinControls().Show();
		}

		private void BtnAnimation_OnClick(object sender, RoutedEventArgs e)
		{
			new WinAnimation().Show();
		}

        private void BtnMah_OnClick(object sender, RoutedEventArgs e)
        {
            new WinMah().Show();
        }

		private void BtnWindow_OnClick(object sender, RoutedEventArgs e)
		{
			new WinWindow().Show();
		}
	}
}
